/* 现代风格重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6C63FF;
    --secondary-color: #4A44C6;
    --accent-color: #FF6584;
    --dark-color: #2A2D36;
    --light-color: #F8F9FA;
    --gray-color: #6c757d;
    --success-color: #28a745;
    --transition: all 0.3s ease;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 15px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
    --font-primary: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-heading: 'Poppins', var(--font-primary);
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f0f2f5;
    font-size: 16px;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 导航样式 */
header {
    background: rgba(0, 0, 0, 0.8);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

/* Language switcher styles */
.lang-switcher {
    position: relative;
    margin-right: 1rem;
}

.lang-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    transition: var(--transition);
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
}

.lang-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.lang-btn.open .lang-arrow {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(30, 30, 30, 0.95);
    border-radius: var(--border-radius);
    padding: 0.5rem 0;
    min-width: 120px;
    box-shadow: var(--shadow-hover);
    z-index: 1001;
    display: none;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.lang-dropdown.open {
    display: block;
}

.lang-option {
    display: block;
    padding: 0.8rem 1rem;
    color: white;
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
}

.lang-option:hover {
    background: rgba(108, 99, 255, 0.2);
    padding-left: 1.5rem;
}

header.scrolled {
    background: rgba(0, 0, 0, 0.95);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 0;
    transition: padding 0.3s ease;
}

nav.scrolled {
    padding: 0.8rem 0;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.8rem;
    color: white;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: font-size 0.3s ease;
}

nav.scrolled .logo {
    font-size: 1.5rem;
}

nav ul {
    display: flex;
    align-items: center;
}

nav li {
    margin: 0 1rem;
}

nav a {
    font-weight: 500;
    color: #f5f5f7;
    position: relative;
    padding: 0.5rem 0;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: var(--transition);
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

nav a:hover {
    color: white;
}

/* 现代汉堡菜单按钮（移动端） */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background: white;
    border-radius: 3px;
    transition: var(--transition);
}

/* 响应式设计 - 移动端导航 */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    nav ul {
        position: fixed;
        top: 85px;
        left: 0;
        width: 100%;
        background: rgba(0, 0, 0, 0.95);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        clip-path: circle(0px at 90% -10%);
        -webkit-clip-path: circle(0px at 90% -10%);
        transition: all 0.5s ease-out;
        backdrop-filter: blur(10px);
    }
    
    nav ul.open {
        clip-path: circle(1000px at 90% -10%);
        -webkit-clip-path: circle(1000px at 90% -10%);
    }
    
    nav li {
        margin: 1rem 0;
    }
    
    nav a {
        font-size: 1.2rem;
        padding: 0.5rem 1rem;
    }
}

/* 主要内容区域 */
main {
    margin-top: 85px;
}

section {
    padding: 5rem 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* 首页样式 */
#home {
    background-color: #000;
    color: #f5f5f7;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#home-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    opacity: 0.7;
}

.home-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    z-index: 2;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 1s ease-out 0.5s forwards;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#home h1 {
    font-family: var(--font-heading);
    font-size: 5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.05;
    letter-spacing: -0.01em;
}

#home p {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    font-weight: 400;
    opacity: 0.9;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--accent-color);
    color: white;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.btn:hover {
    background: #ff4d6d;
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

/* Apple风格的链接样式 */
.apple-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.apple-link {
    color: #2997ff;
    font-size: 1.2rem;
    font-weight: 400;
    text-decoration: none;
    position: relative;
    opacity: 0;
    animation: fadeUp 1s ease-out 1s forwards;
}

.apple-link::after {
    content: ">";
    margin-left: 0.5rem;
    font-size: 0.8rem;
    transition: var(--transition);
}

.apple-link:hover {
    color: #2997ff;
}

.apple-link:hover::after {
    transform: translateX(3px);
}

/* 关于我样式 */
#about {
    background-color: var(--light-color);
    padding: 6rem 0;
}

.section-title {
    text-align: center;
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--dark-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-top: 3rem;
}

.about-text h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--gray-color);
    font-size: 1.1rem;
    line-height: 1.8;
}

/* 现代技能标签样式 */
.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.skill-badge {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.skill-badge::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent) !important;
    transition: 0.5s !important;
}

.skill-badge:hover::before {
    left: 100% !important;
}

.skill-badge:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

/* Skill badge levels */
.skill-badge.primary {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
}

.skill-badge.secondary {
    background: linear-gradient(135deg, #2196F3, #0D47A1);
}

.skill-badge.tertiary {
    background: linear-gradient(135deg, #FF9800, #EF6C00);
}

/* Timeline styles */
.timeline {
    margin-top: 3rem;
}

.timeline h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
}

.timeline-item {
    display: flex;
    margin-bottom: 2rem;
    position: relative;
    padding-left: 30px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 2px solid white;
    z-index: 1;
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 25px;
    width: 2px;
    height: calc(100% + 10px);
    background: var(--primary-color);
}

.timeline-item:last-child::after {
    display: none;
}

.timeline-date {
    flex: 0 0 100px;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.timeline-content {
    flex: 1;
    padding: 1rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    position: relative;
}

.timeline-content h4 {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* Achievements styles */
.achievements {
    margin-top: 3rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(240, 242, 245, 0.9));
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(108, 99, 255, 0.1);
}

.achievements h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
    position: relative;
    padding-bottom: 0.8rem;
}

.achievements h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 3px;
}

.achievements ul {
    list-style: none;
    padding: 0;
}

.achievements li {
    padding: 1rem 1rem 1rem 2.5rem;
    margin-bottom: 0.8rem;
    position: relative;
    font-weight: 500;
    color: var(--gray-color);
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    transition: var(--transition);
    border-left: 3px solid var(--primary-color);
}

.achievements li::before {
    content: '✓';
    position: absolute;
    left: 0.8rem;
    top: 1rem;
    color: var(--success-color);
    font-weight: bold;
    background: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.achievements li:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background: white;
}

/* 现代个人照片样式 */
.about-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-image img {
    border-radius: var(--border-radius);
    height: 350px;
    width: 350px;
    object-fit: cover;
    box-shadow: var(--shadow-hover);
    transition: var(--transition);
    position: relative;
    z-index: 2;
}

.about-image::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border: 3px solid var(--primary-color);
    border-radius: var(--border-radius);
    top: 25px;
    left: 25px;
    z-index: 1;
    transition: var(--transition);
}

.about-image:hover img {
    transform: translateY(-10px);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.2);
}

.about-image:hover::before {
    top: 35px;
    left: 35px;
}

/* 项目样式 */
#projects {
    background-color: white;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.project-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.project-img {
    height: 200px;
    overflow: hidden;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-img img {
    transform: scale(1.05);
}

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.project-info p {
    color: var(--gray-color);
    margin-bottom: 1rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    background: #eef2ff;
    color: var(--secondary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-links a {
    font-weight: 600;
    font-size: 0.9rem;
}

/* 联系样式 */
#contact {
    background: #0a0a0a;
    color: white;
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

#contact .section-title {
    color: white;
    margin-bottom: 1rem;
    text-align: center;
}

#contact .section-title::after {
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

#contact p {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 2rem;
    color: rgba(255,255,255,0.7);
    font-size: 1.1rem;
    line-height: 1.6;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 3rem;
    align-items: start;
}

.contact-form-section {
    background: rgba(30, 30, 30, 0.8);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
}

#contact-form {
    text-align: left;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-control {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    background: rgba(50, 50, 50, 0.8);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    position: relative;
}

.form-control:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--primary-color);
    background: rgba(40, 40, 40, 0.9);
    border-color: var(--primary-color);
}

.form-control::placeholder {
    color: #888;
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.contact-info-section {
    background: rgba(30, 30, 30, 0.6);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 2;
}

.contact-info-section h3 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.8rem;
}

.contact-info-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 3px;
}

.social-links {
    margin: 1.5rem 0;
}

.social-link {
    display: flex;
    align-items: center;
    padding: 0.8rem;
    margin-bottom: 1rem;
    background: rgba(50, 50, 50, 0.5);
    border-radius: 8px;
    text-decoration: none;
    transition: var(--transition);
    color: white;
}

.social-link:hover {
    background: rgba(70, 70, 70, 0.7);
    transform: translateX(5px);
}

.social-icon {
    font-size: 1.2rem;
    margin-right: 0.8rem;
    width: 24px;
    text-align: center;
}

.social-link span {
    font-weight: 500;
}

.contact-details {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-details h4 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.contact-details p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    font-size: 0.95rem;
    text-align: left;
}

/* 响应式设计调整 */
@media (max-width: 992px) {
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    #contact {
        padding: 4rem 0;
    }
}

/* 现代化按钮样式 */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    font-size: 1rem;
    margin-top: 1rem;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.btn:active {
    transform: translateY(-1px);
}

/* 联系部分背景装饰元素 */
#contact::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(108, 99, 255, 0.1) 0%, transparent 70%);
    top: 10%;
    left: 10%;
    border-radius: 50%;
    z-index: 1;
}

#contact::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 101, 132, 0.1) 0%, transparent 70%);
    bottom: 10%;
    right: 10%;
    border-radius: 50%;
    z-index: 1;
}

/* 粒子效果背景 */
.particle {
    position: absolute;
    background: rgba(108, 99, 255, 0.5);
    border-radius: 50%;
    z-index: 1;
}

.particle-1 {
    width: 5px;
    height: 5px;
    top: 20%;
    left: 15%;
    animation: float 6s ease-in-out infinite;
}

.particle-2 {
    width: 3px;
    height: 3px;
    top: 70%;
    left: 80%;
    animation: float 8s ease-in-out infinite;
    animation-delay: 1s;
}

.particle-3 {
    width: 4px;
    height: 4px;
    top: 40%;
    left: 70%;
    animation: float 7s ease-in-out infinite;
    animation-delay: 2s;
}

.particle-4 {
    width: 6px;
    height: 6px;
    top: 60%;
    left: 25%;
    animation: float 9s ease-in-out infinite;
    animation-delay: 0.5s;
}

@keyframes float {
    0% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(20px, 20px);
    }
    100% {
        transform: translate(0, 0);
    }
}

/* 页脚样式 */
footer {
    background: var(--dark-color);
    color: white;
    text-align: center;
    padding: 2rem 0;
}

/* 响应式设计 */
@media (max-width: 992px) {
    #home h1 {
        font-size: 2.8rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .skills {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    #home {
        padding: 2rem 0;
    }
    
    #home h1 {
        font-size: 2.5rem;
    }
    
    #home p {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .project-grid {
        grid-template-columns: 1fr;
    }
    
    .apple-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    #home-video {
        object-position: center;
    }
}

@media (max-width: 576px) {
    .container {
        width: 95%;
    }
    
    #home h1 {
        font-size: 2rem;
    }
    
    .btn {
        padding: 0.8rem 2rem;
    }
    
    section {
        padding: 3rem 0;
    }
}